﻿using ServerCommon.Log;
using ServerCommon.Net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pb
{
    public partial class S2SServerInitReq : Protocol<S2SServerInitReq>
    {
        private static LogHelper log = LogHelper.GetLogger(typeof(S2SServerInitReq));

        public override void OnProcess(NetNode netService, NetSession session)
        {
            session._remoteNodeId = ClientNodeId;
            netService.AddNetSession(ClientNodeId, session);
            var ack = new S2SServerInitAck();
            netService.SendProtocol(session, ack);
            log.Info(netService.ToString());
            log.Info(session.ToString());
        }
    }
}
